package com.dinggao.crossgo.module.roadbook.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dinggao.crossgo.R;
import com.dinggao.crossgo.module.roadbook.data.RoadBookLeftBean;

import java.util.List;

/**
 * created by mapingan on 2018/8/16.
 */
public class RoadBookLeftAdapter extends BaseQuickAdapter<RoadBookLeftBean,BaseViewHolder> {

    public RoadBookLeftAdapter(int layoutResId, @Nullable List<RoadBookLeftBean> data) {
        super(R.layout.item_main_rod_left, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, RoadBookLeftBean item) {
        helper.setText(R.id.center_text_left_item,item.getTitle())
                .setText(R.id.text_right_left_item,item.getRight());

        Glide.with(mContext)
                .load(item.getImage())
                .into((ImageView) helper.getView(R.id.left_image_left_item));
    }
}
